package com.gla.giliair.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * discount
 * @author 
 */
@ApiModel(value="com.gla.giliair.entity.Discount折扣幅度表")
@Data
public class Discount implements Serializable {
    /**
     * 折扣幅度id
     */
    @ApiModelProperty(value="折扣幅度id")
    private Long discountId;

    /**
     * 航空公司外键id
     */
    @ApiModelProperty(value="航空公司外键id")
    private Long companyId;

    /**
     * 成人票折扣：小于1乘算，大于1减算
     */
    @ApiModelProperty(value="成人票折扣：小于1乘算，大于1减算")
    private BigDecimal adultDiscount;

    /**
     * 儿童票折扣：小于1乘算，大于1减算
     */
    @ApiModelProperty(value="儿童票折扣：小于1乘算，大于1减算")
    private BigDecimal childrenDiscount;

    /**
     * 普通折扣：小于1乘算，大于1减算
     */
    @ApiModelProperty(value="普通折扣：小于1乘算，大于1减算")
    private BigDecimal normalDiscount;

    /**
     * 银牌客户折扣：小于1乘算，大于1减算
     */
    @ApiModelProperty(value="银牌客户折扣：小于1乘算，大于1减算")
    private BigDecimal silverDiscount;

    /**
     * 金牌客户折扣：小于1乘算，大于1减算
     */
    @ApiModelProperty(value="金牌客户折扣：小于1乘算，大于1减算")
    private BigDecimal goldDiscount;

    /**
     * 创建时间
     */
    @ApiModelProperty(value="创建时间")
    private Date createTime;

    /**
     * 更新时间
     */
    @ApiModelProperty(value="更新时间")
    private Date updateTime;

    /**
     * 是否被删除：0->否；1->是
     */
    @ApiModelProperty(value="是否被删除：0->否；1->是")
    private Integer isDeleted;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Discount other = (Discount) that;
        return (this.getDiscountId() == null ? other.getDiscountId() == null : this.getDiscountId().equals(other.getDiscountId()))
            && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId()))
            && (this.getAdultDiscount() == null ? other.getAdultDiscount() == null : this.getAdultDiscount().equals(other.getAdultDiscount()))
            && (this.getChildrenDiscount() == null ? other.getChildrenDiscount() == null : this.getChildrenDiscount().equals(other.getChildrenDiscount()))
            && (this.getNormalDiscount() == null ? other.getNormalDiscount() == null : this.getNormalDiscount().equals(other.getNormalDiscount()))
            && (this.getSilverDiscount() == null ? other.getSilverDiscount() == null : this.getSilverDiscount().equals(other.getSilverDiscount()))
            && (this.getGoldDiscount() == null ? other.getGoldDiscount() == null : this.getGoldDiscount().equals(other.getGoldDiscount()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getDiscountId() == null) ? 0 : getDiscountId().hashCode());
        result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
        result = prime * result + ((getAdultDiscount() == null) ? 0 : getAdultDiscount().hashCode());
        result = prime * result + ((getChildrenDiscount() == null) ? 0 : getChildrenDiscount().hashCode());
        result = prime * result + ((getNormalDiscount() == null) ? 0 : getNormalDiscount().hashCode());
        result = prime * result + ((getSilverDiscount() == null) ? 0 : getSilverDiscount().hashCode());
        result = prime * result + ((getGoldDiscount() == null) ? 0 : getGoldDiscount().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", discountId=").append(discountId);
        sb.append(", companyId=").append(companyId);
        sb.append(", adultDiscount=").append(adultDiscount);
        sb.append(", childrenDiscount=").append(childrenDiscount);
        sb.append(", normalDiscount=").append(normalDiscount);
        sb.append(", silverDiscount=").append(silverDiscount);
        sb.append(", goldDiscount=").append(goldDiscount);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}